package com.linkage.lcims.base.po.business;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
@SuppressWarnings("serial")
public class BdTollPolicySuitPK implements Serializable {

    /** identifier field */
    private Integer policyid;

    /** identifier field */
    private Integer recordid;

    /** identifier field */
    private Integer beginaddspan;

    /** identifier field */
    private Integer datetype;

    /** identifier field */
    private String begintimespan;

    /** full constructor */
    public BdTollPolicySuitPK(Integer policyid, Integer recordid, Integer beginaddspan, Integer datetype, String begintimespan) {
        this.policyid = policyid;
        this.recordid = recordid;
        this.beginaddspan = beginaddspan;
        this.datetype = datetype;
        this.begintimespan = begintimespan;
    }

    /** default constructor */
    public BdTollPolicySuitPK() {
    }

    /** 
     *                @hibernate.property
     *                 column="policyid"
     *                 length="10"
     *             
     */
    public Integer getPolicyid() {
        return this.policyid;
    }

    public void setPolicyid(Integer policyid) {
        this.policyid = policyid;
    }

    /** 
     *                @hibernate.property
     *                 column="recordid"
     *                 length="10"
     *             
     */
    public Integer getRecordid() {
        return this.recordid;
    }

    public void setRecordid(Integer recordid) {
        this.recordid = recordid;
    }

    /** 
     *                @hibernate.property
     *                 column="beginaddspan"
     *                 length="10"
     *             
     */
    public Integer getBeginaddspan() {
        return this.beginaddspan;
    }

    public void setBeginaddspan(Integer beginaddspan) {
        this.beginaddspan = beginaddspan;
    }

    /** 
     *                @hibernate.property
     *                 column="datetype"
     *                 length="10"
     *             
     */
    public Integer getDatetype() {
        return this.datetype;
    }

    public void setDatetype(Integer datetype) {
        this.datetype = datetype;
    }

    /** 
     *                @hibernate.property
     *                 column="begintimespan"
     *                 length="6"
     *             
     */
    public String getBegintimespan() {
        return this.begintimespan;
    }

    public void setBegintimespan(String begintimespan) {
        this.begintimespan = begintimespan;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("policyid", getPolicyid())
            .append("recordid", getRecordid())
            .append("beginaddspan", getBeginaddspan())
            .append("datetype", getDatetype())
            .append("begintimespan", getBegintimespan())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof BdTollPolicySuitPK) ) return false;
        BdTollPolicySuitPK castOther = (BdTollPolicySuitPK) other;
        return new EqualsBuilder()
            .append(this.getPolicyid(), castOther.getPolicyid())
            .append(this.getRecordid(), castOther.getRecordid())
            .append(this.getBeginaddspan(), castOther.getBeginaddspan())
            .append(this.getDatetype(), castOther.getDatetype())
            .append(this.getBegintimespan(), castOther.getBegintimespan())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getPolicyid())
            .append(getRecordid())
            .append(getBeginaddspan())
            .append(getDatetype())
            .append(getBegintimespan())
            .toHashCode();
    }

}
